export default [
    {
        key: "id",
        title: "ID",
        type: "text",
    },
    {
        key: "name",
        title: "角色名",
        type: "text",
        placeholder: "请输入角色名",
    },
    {
        key: "description",
        title: "角色描述",
        type: "text",
        placeholder: "请输入角色描述",
    },
    {
        key: "is_default",
        title: "默认角色",
        type: "boolean",
        //@ts-ignore
        render: function(model: any, column: any){
            if(model?.is_default){
                return `<span class="badge bg-success">是</span>`;
            } else {
                return `<span class="badge bg-secondary">否</span>`;
            }
        },
    },
    {
        key: "is_system",
        title: "系统角色",
        type: "boolean",
        //@ts-ignore
        render: function(model: any, column: any){
            if(model?.is_system){
                return `<span class="badge bg-success">是</span>`;
            } else {
                return `<span class="badge bg-secondary">否</span>`;
            }
        },
    },
    {
        key: "created_at",
        title: "创建时间",
        type: "text",
    },
    {
        key: "updated_at",
        title: "更新时间",
        type: "text",
    },
];